﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace OneOfAll.Common.Resources
{
    public class MultiplicationConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            double result = 0.0;
            try
            {
                double num = double.Parse(value.ToString());
                double rad = double.Parse(parameter.ToString());
                result = num * rad;
            }
            catch
            {
                result = 0.0;
            }
            return result;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {

                return Binding.DoNothing;
        }
    }
}
